<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let arr = [
            "one",
            "two",
            "three",
            "four"
        ]

        // 查找
        let n = arr.find(function(item){
            // 回调函数 执行了4次
            // console.log("find内部",item); //item = one / two ...

            // 返回值为真，就会将对一个的值返回给find结果值
            // if(item === "one"){
            //     return true;
            // }else{
            //     return false;
            // }

            return item === "two2";
        });

        console.log(n);

       


    </script>
</body>
</html>